package uf.audit.tax.lesser;

import java.io.File;
import java.io.IOException;
import java.util.Arrays;

import org.lesscss.LessCompiler;
import org.lesscss.LessException;

/**
 * Less compiler main class!
 *
 */
public class Main 
{
    public static void main( String[] args )
    {
    	if (args.length != 2) {
    		System.out.println("Usage: java - jar lesser.jar src-file dist-file");
    		System.exit(1);
    	}
    	String srcFile = args[0];
    	String distFile = args[1];
    	
    	LessCompiler lessCompiler = new LessCompiler(Arrays.asList("--relative-urls", "--strict-math=on"));

    	try {
	    	lessCompiler.compile(new File(srcFile), new File(distFile));
		} catch (LessException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		}
    }
}
